﻿@page "/RazorPage/MaterialDisposal/EmailTemplate/{formid:int?}"
@model RndMaterialDisposalService.Pages.EmailTemplates.MaterialDisposal.IndexModel
@{
    Layout = "~/Pages/Shared/_EmailLayout.cshtml";
    int idx = 0;
    var MaterialInfoList = Model.FormData?.MaterialInfo ?? new List<RndMaterialDisposalService.Models.RequestModel.MaterialInfoDetailModel>();
}

<table style="width: 100%; border-spacing: 0; border-collapse: collapse; font-family: 宋体; font-size: 10pt;">
    <tr style="background-color: #B8B8B8; color: black; font-size: 11pt; font-weight: bold;">
        <td colspan="4">申请信息</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">填表人:</td>
        <td style="width: 30%;">@Model.FormData?.Applicant</td>
        <td style="font-weight: Bold;width: 20%;">填表时间:</td>
        <td style="width: 30%;">@Model.FormData?.ApplicantDate?.ToString("yyyy-MM-dd HH:mm")</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">产品线:</td>
        <td style="width: 30%;">@Model.FormData?.Organization</td>
        <td style="font-weight: Bold;width: 20%;">是否外购的竞争对手样机:</td>
        <td style="width: 30%;">@Model.FormData?.IsOutsourcing</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">部门名称:</td>
        <td style="width: 30%;">@Model.FormData?.DeptName</td>
        <td style="font-weight: Bold;width: 20%;">部门编码:</td>
        <td style="width: 30%;">@Model.FormData?.DeptCode</td>

    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">项目名称:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectName</td>
        <td style="font-weight: Bold;width: 20%;">项目编码:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectCode</td>

    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">位置:</td>
        <td style="width: 30%;">@Model.FormData?.Position</td>
        <td style="font-weight: Bold;width: 20%;">项目状态:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectStatus</td>
    </tr>

    <tr>
        <td style="font-weight: Bold;width: 20%;">报废原因:</td>
        <td colspan="3">@Model.FormData?.DisposalRemark</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">报废物料中不会涉及有知识产权或商务秘密:</td>
        <td colspan="3">@string.Join(",",Model.FormData?.IsCheck??new string[0])</td>
    </tr>

    <tr>
        <td style="font-weight: Bold;width: 20%;">需要保密处理的物料清单:</td>
        <td style="width: 30%;">@Model.FormData?.IsChecklist1</td>
        <td style="font-weight: Bold;width: 20%;">说明:</td>
        <td style="width: 30%;">@Model.FormData?.RemarkChecklist1</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">报废物料中是否有软件载体:</td>
        <td style="width: 30%;">@Model.FormData?.IsChecklist2</td>
        <td style="font-weight: Bold;width: 20%;">说明:</td>
        <td style="width: 30%;">@Model.FormData?.RemarkChecklist2</td>
    </tr>
        <tr>
        <td style="font-weight: Bold;width: 20%;">报废物料中是否有危险化学品:</td>
        <td style="width: 30%;">@Model.FormData?.IsChecklist3</td>
        <td style="font-weight: Bold;width: 20%;">说明:</td>
        <td style="width: 30%;">@Model.FormData?.RemarkChecklist3</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">报废物料中是否做过破坏性试验对器件有无影响:</td>
        <td style="width: 30%;">@Model.FormData?.IsChecklist4</td>
        <td style="font-weight: Bold;width: 20%;">说明:</td>
        <td style="width: 30%;">@Model.FormData?.RemarkChecklist4</td>
    </tr>

    <tr style="background-color: #B8B8B8; color: black; font-size: 11pt; font-weight: bold;">
        <td colspan="4">物料列表</td>
    </tr>
    @foreach (var item in MaterialInfoList)
    {
        <tr>
            <td style="font-weight: Bold;width: 20%;">【# @(idx += 1)】 型号描述:</td>
            <td colspan="3">@item.Model</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">物料类型:</td>
            <td style="width: 30%;">@item.Type</td>
            <td style="font-weight: Bold;width: 20%;">单位:</td>
            <td style="width: 30%;">@item.Type</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">报废申请数量:</td>
            <td style="width: 30%;">@item.DisposalCount</td>
            <td style="font-weight: Bold;width: 20%;">单价:</td>
            <td style="width: 30%;">@item.Price</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">总价:</td>
            <td style="width: 30%;">@item.TotalPrice</td>
            <td style="font-weight: Bold;width: 20%;">物料来源:</td>
            <td style="width: 30%;">@item.Source</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">物料存放地点:</td>
            <td style="width: 30%;">@item.Place</td>
            <td style="font-weight: Bold;width: 20%;">申请部门已回收器件情况:</td>
            <td style="width: 30%;">@item.RecycleRemark</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">库房回收器件记录:</td>
            <td style="width: 30%;">@item.RecycleRecord</td>
            <td style="font-weight: Bold;width: 20%;">实际接收报废数量:</td>
            <td style="width: 30%;">@item.DisposalRealCount</td>
        </tr>
    }
</table>